
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
    <ui:composition  template="/templates/main.xhtml">]
        <ui:define name="main">
            <a4j:keepAlive beanName="logonMbean" />
            <h:form>
                <div align="center">
                <table>
                    <tr>
                        <td colspan="2">
                         管理员登陆
                        </td>
                    </tr>
                    <tr>
                        <td>
                           管理员ID：
                         </td>
                         <td>
                            <h:inputText value="#{logonMbean.userID}"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                          密码：
                                              </td>
                         <td>
                            <h:inputSecret value="#{logonMbean.password}"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                          验证码：
                        </td>
                         <td>
                            <h:inputText value="#{logonMbean.vCode}"  />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                           <rich:paint2D id="painter" width="#{logonMbean.vc.width}" height="#{logonMbean.vc.height}"
                                          data="#{logonMbean.vc}" format="png" paint="#{logonMbean.paintVerifyCode}" />
                               
                           <a4j:commandLink action="#{logonMbean.newVCodeActon}" immediate="true" reRender="painter" value="刷新验证码"/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <h:commandButton value="登陆" action="#{logonMbean.admlogonAction}"/>
                        </td>
                    </tr>
                </table>
              </div>
           </h:form>
        </ui:define>
    </ui:composition>
</html>

